package unittests;

import java.sql.SQLException;
import java.util.ArrayList;

import server.ServerProduceReport;
import junit.framework.TestCase;


public class DailyTest extends TestCase {

	private ArrayList <String> userArray;
	private ArrayList <String> customerPhotoArray;
	private ArrayList <String> photoArray;
	
	public DailyTest(String name) {
		super(name);
		userArray = new ArrayList <String>();
		customerPhotoArray = new ArrayList <String>();
		photoArray = new ArrayList <String>();
		
	}

/*	protected void setUp() throws Exception {
		m12chf = new Money(12,"CHF");
		m14chf = new Money(14,"CHF");
	}
	*/

	public void testAdd() throws SQLException {
		int[] array = new int[4];
		array[0] = 3; 
		array[1] = 5; 
		array[2] = 8; 
		array[3] = 5;
		
		userArray.add("2014/07/10");
		userArray.add("2014/07/10");
		userArray.add("2014/07/10");
		
		customerPhotoArray.add("2014/07/10");
		customerPhotoArray.add("2014/07/10");
		customerPhotoArray.add("2014/07/10");
		customerPhotoArray.add("2014/07/10");
		customerPhotoArray.add("2014/07/10");
		
		photoArray.add("2014/10/08");
		photoArray.add("2014/09/07");
		photoArray.add("2014/08/07");
		photoArray.add("2014/07/10");
		photoArray.add("2014/07/10");
		photoArray.add("2014/07/10");
		photoArray.add("2014/07/10");
		photoArray.add("2014/07/10");
		
		
		ServerProduceReport expected1 = new  ServerProduceReport (array); 
		ServerProduceReport result1 = new  ServerProduceReport ();
		result1.dailyStatistic(userArray, customerPhotoArray, photoArray);
		assertTrue(result1.equal(expected1));
		
		array[0] = 10; 
		array[1] = 15; 
		array[2] = -20; 
		array[3] = 25;
		
		ServerProduceReport expected2 = new  ServerProduceReport (array); 
		assertFalse(expected2.allPositive());
		
		userArray.clear();
		
		ServerProduceReport result3 = new  ServerProduceReport (array); 
		result3.dailyStatistic(userArray, customerPhotoArray, photoArray);	
		assertTrue(result3.noData());
		
	}

	
	public void testEquals() 
	{ 
		
	}
}
